package com.github.ecbp.user.service.service;

import com.github.ecbp.common.data.service.BaseService;
import com.github.ecbp.user.service.entity.TMenu;
import com.github.ecbp.user.service.entity.TPermission;
import com.github.ecbp.user.service.entity.TPermissionMenuRelation;
import com.github.ecbp.user.service.response.MenuRes;
import com.github.ecbp.user.service.response.PermissionRes;

import java.util.List;
import java.util.Set;

/**
 * @name: PermissionMenuRelationService
 * @description:
 * @author: zhangj
 * @create: 2020-05-07 19:04
 **/
public interface PermissionMenuRelationService extends BaseService<TPermissionMenuRelation> {
    List<PermissionRes> getPermissionVoByMenuId(Set<Long> menuIds);

    List<MenuRes> getMenuVoByPermissionId(Set<Long> permissionIds);

    /**
     * 通过菜单ID查询权限信息
     *
     * @param menuId
     * @return java.util.Set<com.ecbp.service.user.entity.TPermission>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TPermission> getPermissionByMenuId(Long menuId);

    /**
     * 通过菜单ID查询权限信息
     *
     * @param menuIds
     * @return java.util.Set<com.ecbp.service.user.entity.TPermission>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TPermission> getPermissionByMenuId(Set<Long> menuIds);

    /**
     * 通过权限ID查询菜单信息
     *
     * @param permissionId
     * @return java.util.Set<com.ecbp.service.user.entity.TMenu>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TMenu> getMenuByPermissionId(Long permissionId);

    /**
     * 通过权限ID查询菜单信息
     *
     * @param permissionIds
     * @return java.util.Set<com.ecbp.service.user.entity.TMenu>
     * @author zj2626
     * @date 2020/5/12
     */
    List<TMenu> getMenuByPermissionId(Set<Long> permissionIds);
}
